Customer Profile
Details
Used to lookup a customer by phone.
URL : <base_url>/rewards/profile
Method : POST
Authentication required : YES
Request parameters
In the request URL, provide the following parameter in the URL
Parameter | Type | Example | Description |
---|---|---|---|
number | string | +18761234567 | It uniquely identifies a customer. |
Success Response
Code : 200 OK
Content :
{
"success": true,
"customer": {
"number": "+18761234567",
"is_customer": true,
"first_name": "John",
"last_name": "Brown",
"points_balance": "3030",
"last_cashier_activity": {
"id": 45,
"created_at": "2021-11-28T22:24:07.000000Z",
"updated_at": "2021-11-28T22:24:07.000000Z",
"model": "\\App\\Models\\Cashier",
"type": "redeem",
"pivot_id": 1,
"phone": "+18761234567",
"spend": 0,
"points": 500,
"pivot_identifier": "Suzette brown",
"reward_name": "1 free mini goddie bag",
"related": "[13]",
"team_id": 1,
"location_id": 1,
"reference_number": "2343434"
},
"redeemable_rewards": [
{
"id": 1,
"created_at": "2021-08-20T22:15:38.000000Z",
"updated_at": "2021-08-20T22:16:03.000000Z",
"loyalty_id": 1,
"team_id": 1,
"points": 500,
"name": "1 free mini goddie bag",
"active": 1
}
]
}
}
OR a state where customer does not have an account with you
{
"success": true,
"data": {
"number": "+18761234567",
"is_customer": false,
"first_name": "Rushio",
"last_name": "Billings",
"points_balance": 0,
"last_cashier_activity": null,
"redeemable_rewards": []
}
}
Error Responses
Condition : Invalid loyalty service.
Code : 400 BAD REQUEST
Content :
{
"message": "The given data was invalid.",
"errors": {
"loyalty": "Loyalty service not active for this account."
}
}
Condition : Invalid loyalty service.
Code : 400 BAD REQUEST
Content :
{
"message": "The given data was invalid.",
"errors": {
"loyalty": "Invalid loyalty subscription."
}
}